package com.abst;

public class Manager extends Employee {
    private Clerk clerk;

    public Manager() {
    }

    public Manager(String name, String workId, String department, Clerk clerk) {
        super(name, workId, department, 9000);
        this.clerk = clerk;
    }

    public Clerk getClerk() {
        return clerk;
    }

    public void setClerk(Clerk clerk) {
        this.clerk = clerk;
    }

    @Override
    public String showMsg() {
        return this.getDepartment() + ": " + this.getName() + ", 员工编号：" + this.getWorkId() + "工资：" + getSarary() +
                "\n" +
                " 他的员工为：" + this.clerk.getName();
    }

    @Override
    public String toString() {
        return showMsg();

    }

}
